package com.scpii.universal.pns.dao.impl;

import org.springframework.stereotype.Repository;

import com.scpii.universal.hibernate.dao.impl.BaseDaoImpl;
import com.scpii.universal.pns.dao.ResourcesDao;
import com.scpii.universal.pns.entity.Resources;

@Repository
public class ResourcesDaoImpl extends BaseDaoImpl<Resources, Long> implements
		ResourcesDao {

	@Override
	public void deleteByTargerId(Long targetId) {
		String hql = "delete from Resources t where t.targetId=?";
		getHibernateTemplate().getSessionFactory().getCurrentSession()
				.createQuery(hql).setParameter(0, targetId).executeUpdate();
	}

}
